#ifndef _StaminaLackDialog_h__
#define _StaminaLackDialog_h__

#include "Global.h"





class StaminaLackDialog
	: public ModelDialog
	, public CCBMemberVariableAssigner
	, public CCBSelectorResolver
	, public CCNodeLoaderListener
{
public:
	CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(StaminaLackDialog, create);

	StaminaLackDialog(void);
	~StaminaLackDialog(void);

	virtual SEL_MenuHandler onResolveCCBCCMenuItemSelector(CCObject * pTarget, CCString * pSelectorName);
	virtual SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, CCString * pSelectorName);
	virtual bool onAssignCCBMemberVariable(CCObject * pTarget, CCString * pMemberVariableName, CCNode * pNode);
	virtual void onNodeLoaded(CCNode * pNode, CCNodeLoader * pNodeLoader);
	bool init();
	void refresh();
	void onEnter();
	void onExit();
private:
	CCLabelTTF* mPower;
	CCLabelTTF* mCost;
	void _onNotification(CCObject* object);
	void onDoItClick(CCObject* pSender);
	void onBuyOrUserBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);
	void onCloseBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);
};

#endif